package day_2022_12_to_3.day;

/**
 * @author haomin
 * @date 2022/12/16 12:20
 **/
public class Day12_16_Num1785 {
    class Solution {
        public int minElements(int[] nums, int limit, int goal) {
            long sum = 0;
            for(int i : nums) sum += i;
            long real = Math.abs(goal - sum);
            return (int)(real/limit) + (real % limit == 0 ? 0 : 1);
        }
    }
}